package com.geaosu.wanandroid.kotlin.learn

/*函数的参数默认值*/

fun main() {
    readBooks1("小明", 21)
    readBooks2(age = 22)
    readBooks3()
    readBooks4(msg = "三好学生")
}

fun readBooks1(name: String, age: Int) {}
fun readBooks2(name: String = "小明", age: Int) {}
fun readBooks3(name: String = "小明", age: Int = 20) {}
fun readBooks4(name: String = "小明", age: Int = 20, msg: String) {}





